3.3.86 \(\int \frac {(a B+b B \cos (c+d x)) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx\) [286]

Optimal. Leaf size=11 \[ \frac {B \tan (c+d x)}{d} \]

[Out]

B*tan(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {21, 3852, 8} \begin {gather*} \frac {B \tan (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a*B + b*B*Cos[c + d*x])*Sec[c + d*x]^2)/(a + b*Cos[c + d*x]),x]

[Out]

(B*Tan[c + d*x])/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \frac {(a B+b B \cos (c+d x)) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx &=B \int \sec ^2(c+d x) \, dx\\ &=-\frac {B \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}\\ &=\frac {B \tan (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 11, normalized size = 1.00 \begin {gather*} \frac {B \tan (c+d x)}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a*B + b*B*Cos[c + d*x])*Sec[c + d*x]^2)/(a + b*Cos[c + d*x]),x]

[Out]

(B*Tan[c + d*x])/d

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 12, normalized size = 1.09

method result size
derivativedivides \(\frac {B \tan \left (d x +c \right )}{d}\) \(12\)
default \(\frac {B \tan \left (d x +c \right )}{d}\) \(12\)
risch \(\frac {2 i B}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) \(21\)
norman \(\frac {-\frac {2 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 B \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) \(65\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*B+b*B*cos(d*x+c))*sec(d*x+c)^2/(a+b*cos(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

B*tan(d*x+c)/d

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)^2/(a+b*cos(d*x+c)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more de

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 19, normalized size = 1.73 \begin {gather*} \frac {B \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)^2/(a+b*cos(d*x+c)),x, algorithm="fricas")

[Out]

B*sin(d*x + c)/(d*cos(d*x + c))

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 32 vs. \(2 (8) = 16\).
time = 1.82, size = 32, normalized size = 2.91 \begin {gather*} \begin {cases} \frac {B \tan {\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\\frac {x \left (B a + B b \cos {\left (c \right )}\right ) \sec ^{2}{\left (c \right )}}{a + b \cos {\left (c \right )}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)**2/(a+b*cos(d*x+c)),x)

[Out]

Piecewise((B*tan(c + d*x)/d, Ne(d, 0)), (x*(B*a + B*b*cos(c))*sec(c)**2/(a + b*cos(c)), True))

________________________________________________________________________________________

Giac [A]
time = 0.49, size = 11, normalized size = 1.00 \begin {gather*} \frac {B \tan \left (d x + c\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)^2/(a+b*cos(d*x+c)),x, algorithm="giac")

[Out]

B*tan(d*x + c)/d

________________________________________________________________________________________

Mupad [B]
time = 0.47, size = 30, normalized size = 2.73 \begin {gather*} -\frac {2\,B\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*a + B*b*cos(c + d*x))/(cos(c + d*x)^2*(a + b*cos(c + d*x))),x)

[Out]

-(2*B*tan(c/2 + (d*x)/2))/(d*(tan(c/2 + (d*x)/2)^2 - 1))

________________________________________________________________________________________